import {ERR_OK} from '@/utils/commons'

//  普通返回
interface ResponseData<T> {
  Code: number;
  ErrorCode: string;
  Result: T;
  Message: string;
}

//  分页返回

//  分页参数

 const isSuccessRes = <T = any>(res: ResponseData<T>): boolean => {
  const {Code} = res;
  return Code === ERR_OK;
};


const getOriginPic = (compressUrl: string) => compressUrl.slice(0, -12)


export {ResponseData,isSuccessRes,getOriginPic}
